import Skeleton from '@/components/Skeleton/index.vue'
import Slider from '@/components/Slider/index.vue'
import More from '@/components/More/index.vue'
import Bread from '@/components/Bread/index.vue'
import BreadItem from '@/components/Bread/item.vue'
import infiniteLodin from '@/components/infiniteLodin/index.vue'
import City from '@/City/index.vue'
const list = [Skeleton, Slider, More, Bread, BreadItem, infiniteLodin, City]
// 全局组件一般注册到components中的index.js
// 把需要注册的全局组件放到components文件中
// 在main.js中引入import { createApp } from 'vue'
// 使用createApp(App).use(components中的index.js)
// 对象的定义形式
export default {
  install (app) {
    list.forEach(item => {
      // 使用component方法注册全局组件
      app.component(item.name, item)
    })
    // app.component(Skeleton.name, Skeleton)
    // app.component(Slider.name, Slider)
    // app.component(More.name, More)
  }
}
